<template>
  <h1>日期：{{ formatTime(now) }}</h1>
</template>

<script setup lang="ts">
import moment from 'moment';

const now = new Date();
const formatTime = (val: Date) => {
  return moment(now).format('YYYY-MM-DD');
};
</script>
